import request from '@/utils/request'

// 查询出入库列表
export function listInOut(query) {
  return request({
    url: '/work/shopinout/list',
    method: 'get',
    params: query
  })
}

// 查询出入库详细
export function getInOut(id) {
  return request({
    url: '/work/shopinout/' + id,
    method: 'get'
  })
}

// 新增出入库
export function addInOut(data) {
  return request({
    url: '/work/shopinout/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改出入库
export function updateInOut(data) {
  return request({
    url: '/work/shopinout/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除出入库
export function delInOut(id) {
  return request({
    url: '/work/shopinout/delete-by-id',
    method: 'get',
    params: { id: id }
  })
}


export function delInOutDetail(id) {
  return request({
    url: '/work/shopinout/details/delete-by-id',
    method: 'get',
    params: { id: id }
  })
}